<%@ page import="com.jkt.rms.commons.includes.*"%>
<%@ page import="java.util.*"%>
<%@ page import="com.jkt.rms.business.*"%>
<%@ include file="/WEB-INF/jsp/include.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="/spring"%>
<html>
<head>
<SCRIPT language="javascript" type="text/javascript"> 
  function backtoSearch(k1,k2,k3){
	   	document.forms[0].action="vendorlist.htm?method="+k3;
	   	document.forms[0].method="post";
		document.forms[0].submit();
	}
</Script>	
<title><fmt:message key="lbl.title.updateVendor" /></title>
</head><center>
 <body>
	<h2 id="headerbar"><fmt:message key="lbl.title.updateVendor" /></h2>
	<div id="content">
  <table  width="90%" cellpadding="0" cellspacing="0" >
<c:if test="${ not empty errors.allErrors}">
<tr valign="top" align="left">
				<td width="80%">
				<div id="errorFieldSet">
				  <fieldset>
				  <legend ><strong>Errors</strong></legend>
					<table width = "80%" border = "1" cellpadding="0" cellspacing="0" >
						<c:forEach var="err" items="${errors.allErrors}">
					<spring:message code="${err.code}" arguments="${err.arguments}" />
					<br/>
				</c:forEach>
					  	<tr>
					  	</tr>
					  	</table>
					  	</fieldset>
					  	</div>
					  	</td>
					  	</tr>
</c:if>
<c:if test="${ not empty vendorData.message}">
<tr valign="top" align="left">
				<td width="80%">
				<div id="infoFieldSet">
				<fieldset>
				  <legend ><strong>Messages</strong></legend>
					<table width = "80%" border = "1"  cellpadding="0" cellspacing="0" >
					<spring:message code="${vendorData.message}"/>
					  
					  	</table>
					  	</fieldset>
					  	</div>
					  	</td>
					  	</tr>
</c:if> 
	 <tr valign="top" align="center">
			  	<td width="70%">
					  <fieldset>
					  	<legend ><strong>Edit Vendor</strong></legend>
			<form:form method="POST" commandName="vendorData" name="addvendor" action="#">
			<form:hidden path="id"   />
			<form:hidden path="searchMethod" />
			<form:hidden path="searchVendorName" />
			<form:hidden path="searchVendorCode" />
		<table border = "0" width = "80%" >
		  <tr >
		    <td align='center'><label for="textVendorName">Vendor Name:<font color="red">*</font></label></td>
            <td align='left' >
            <form:input  path="vendorName"  maxlength= "100" tabindex="1" title="vendorName" />
             </td>
            <td align=center class=header><label for="textVendorCode">Vendor Code:<font color="red">*</font></label></td>
            <td align='left' class=value>
            <form:input path="vendorCode" maxlength="8" tabindex="2"   />
            </td> 
          </tr>
			<tr  >
            <td align='center' ><label for="textAddressLine1">Address Line 1:<font color="red">*</font></label></td>
            <td align='left' >
              <form:input path="addressLine1"  maxlength= "100" tabindex="3" title="addressLine1" />
            	
            </td>
            
            <td align='center' class=header><label for="AddressLine2">Address Line 2:</label></td>
            <td align='left' class=value>
            <form:input path="addressLine2" maxlength="100" tabindex="4"   />
            </td> 
          </tr>
          
          <tr>
            <td align='center' ><label for="textTown">Town/City:<font color="red">*</font></label></td>
            <td align='left' >
             <form:input path="town"  maxlength= "100" tabindex="5" title="town" />
            </td>
            
            <td align='center' class=header><label for="textState">State/County:<font color="red">*</font></label></td>
            <td align='left' class=value>
            <form:input path="county" maxlength="100" tabindex="6"   />
             
            </td> 
          </tr>
          
          <tr>
            <td align='center' ><label for="textCountry">Country:<font color="red">*</font></label></td>
            <td align='left' >
             <form:input path="country"  maxlength= "100" tabindex="7" title="country" />
            </td>
            
            <td align='center' class=header><label for="textPostcode">Zip/Postcode:</label></td>
            <td align='left' class=value>
            <form:input path="postcode" maxlength="50" tabindex="8"   />
             
            </td> 
          </tr>
          
           <tr>
            <td align='center' ><label for="textContactNo">Contact No:<font color="red">*</font></label></td>
            <td align='left' >
             <form:input path="contactNo"  maxlength= "20" tabindex="9" title="EcontactNo" />
            </td>

            <td align='center' class=header><label for="textEmail">Email:<font color="red">*</font></label></td>
            <td align='left' class=value>
            <form:input path="email" maxlength="100" tabindex="10"   />
             
            </td> 
          </tr>
          
           <tr>
            <td align='center' ><label for="textOffshoreBlendedRate">Off Shore Blended Rate:</label></td>
            <td align='left' >
             <form:input path="offshoreBlendedRate"  maxlength= "8" tabindex="11" title="offshoreBlendedRate" />
            </td>

            <td align='center' class=header><label for="textOnsiteBlendedRate">On Site Blended Rate:</label></td>
            <td align='left' class=value>
            <form:input path="onsiteBlendedRate" maxlength="8" tabindex="12"   />
           </td> 
          </tr>
           <tr valign="top" align="right">
          <td width="40%" align="right">
			<fieldset>
			<legend ><strong>OffShore Contact Person Details</strong></legend>
			<table border = "0" width = "85%" align="right">
   			<tr>
            <td align='right' class=header><label for="textOffshoreName">Name:<font color="red">*</font></label></td>
            <td align='center' class=value><form:input path="offshorePersonName" maxlength="50" tabindex="13"   /></td> 
            </tr>
          <tr>
            <td align='right' ><label for="textAddressLine1">Address Line 1:</label></td>
            <td align='center' >
             <form:input path="offshoreAddressLine1"  maxlength="100" tabindex="14" title="Address Line 1" />
            </td>
          </tr>
           <tr>
            <td align='right' ><label for="textAddressLine2">Address Line 2:</label></td>
            <td align='center' >
             <form:input path="offshoreAddressLine2"  maxlength= "100" tabindex="15" title="Address Line2 " />
            </td>
          </tr>
           <tr>
            <td align='right' ><label for="textTown">Town/City:<font color="red">*</font> </label></td>
            <td align='center' >
             <form:input path="offshoreTown"  maxlength= "100" tabindex="16" title="Town" />
            </td>
          </tr>
           <tr>
            <td align='right' ><label for="textCounty">State/County:<font color="red">*</font></label></td>
            <td align='center' >
             <form:input path="offshoreCounty"  maxlength= "100" tabindex="17" title="State" />
            </td>
          </tr>
           <tr>
            <td align='right' ><label for="textCountry">Country:<font color="red">*</font> </label></td>
            <td align='center' >
             <form:input path="offshoreCountry"  maxlength= "100" tabindex="18" title="Country" />
            </td>
           
          </tr>
           <tr>
            <td align='right' ><label for="textPostcode">Zip/Postcode:</label></td>
            <td align='center' >
             <form:input path="offshorePostCode"  maxlength= "50" tabindex="19" title="Zip" />
            </td>
			</tr>
           <tr>
            <td align='right' ><label for="textContactNo">Contact No:<font color="red">*</font></label></td>
            <td align='center' >
             <form:input path="offshoreContactNo"  maxlength= "20" tabindex="20" title="Contact No" />
            </td>
          </tr>
           <tr>
            <td align='right' ><label for="textEmail"> Email:<font color="red">*</font></label></td>
            <td align='center' >
             <form:input path="offshoreEmail"  maxlength= "100" tabindex="21" title="Email" />
            </td>
          </fieldset>
          </td>
          </tr>
          </table>
           <td width="35%">
					  <fieldset>
					  	<legend ><strong>OnSite Contact Person Details</strong></legend>
					  	<table border = "0" width = "80%" >
		<tr>
            <td align='right' class=header><label for="textOffshoreName">Name:<font color="red">*</font></label></td>
            <td align='center' class=value><form:input path="onsitePersonName" maxlength="50" tabindex="22"   /></td> 
            </tr>
          <tr>
            <td align='right' ><label for="textAddressLine1">Address Line 1:</label></td>
            <td align='center' >
             <form:input path="onsiteAddressLine1"  maxlength= "100" tabindex="23" title="Address Line 1" />
            </td>
          </tr>
           <tr>
            <td align='right' ><label for="textAddressLine2">Address Line 2:</label></td>
            <td align='center' >
             <form:input path="onsiteAddressLine2"  maxlength= "100" tabindex="24" title="Address Line2 " />
            </td>
          </tr>
           <tr>
            <td align='right' ><label for="textTown">Town/City:<font color="red">*</font></label></td>
            <td align='center' >
             <form:input path="onsiteTown"  maxlength= "100" tabindex="25" title="Town" />
            </td>
          </tr>
           <tr>
            <td align='right' ><label for="textCounty">State/County:<font color="red">*</font></label></td>
            <td align='center' >
             <form:input path="onsiteCounty"  maxlength= "100" tabindex="26" title="State" />
            </td>
          </tr>
           <tr>
            <td align='right' ><label for="textCountry">Country:<font color="red">*</font></label></td>
            <td align='center' >
             <form:input path="onsiteCountry"  maxlength= "10" tabindex="27" title="Country" />
            </td>
           
          </tr>
           <tr>
            <td align='right' ><label for="textPostcode">Zip/Postcode:</label></td>
            <td align='center' >
             <form:input path="onsitePostCode"  maxlength= "50" tabindex="28" title="Zip" />
            </td>
			</tr>
           <tr>
            <td align='right' ><label for="textContactNo">Contact No:<font color="red">*</font></label></td>
            <td align='center' >
             <form:input path="onsiteContactNo"  maxlength= "20" tabindex="29" title="Contact No" />
            </td>
          </tr>
           <tr>
            <td align='right' ><label for="textEmail"> Email:<font color="red">*</font></label></td>
            <td align='center' >
             <form:input path="onsiteEmail"  maxlength= "100" tabindex="30" title="Email" />
            </td>
          </tr>
          </table>
          </fieldset>
          </td>
		<tr>
            <td align='left' ><label for="textComments">Comments:</label></td>
            <td><form:textarea path="comments" rows="4" cols="20" tabindex="31" title="Comments" /></td>
            <td colspan="1" ><label>Status :</label></td>
					<td ><form:select path="status" tabindex="32">
					<form:option value="Y">Active</form:option>
					<form:option value="N">InActive</form:option>
					</form:select>
					</td>
          </tr>
          <tr>
            <td align="right">
              <input class="value" type='submit' name='button' value='Save'  tabindex="33" onclick="dosubmit('vendorData','vendorlist.htm?method=updateVendor')" >
            </td>
             <td align="right">
              <input class="value" type='submit' name='button' tabindex="34" onclick="backtoSearch('<c:out value="${vendorData.searchVendorName}"/>','<c:out value="${vendorData.searchVendorCode}"/>','<c:out value="${vendorData.searchMethod}"/>');"  value='Back to Search Result' >
            </td>
          </tr>
   
	  <tr >
            <td colspan="4" align="center">
             &nbsp;
            </td>
          </tr>
           
      </table>
      </fieldset>
      </td>
      </tr>
      </table>
      
</form:form>
	</div>
<%@ include file="footer.jsp" %></center>
</body>
</html>
